
import Vue from 'vue'
import App from './App.vue'
import router from './router'


import axios from './utils/axios'

Vue.prototype.$axios = axios;


// vant ui 全局引入
// import Vant from 'vant'
// import 'vant/lib/index.css'
// Vue.use(Vant)
import {ActionSheet, Dialog, Field, List, Tab, Tabs, Toast, Uploader} from 'vant';
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(List)
Vue.use(Uploader)
Vue.use(Dialog)
Vue.use(Field)
Vue.use(ActionSheet)
Vue.use(Toast)
import 'vant/lib/tab/style'
import 'vant/lib/tabs/style'
import 'vant/lib/list/style'
import 'vant/lib/uploader/style'
import 'vant/lib/dialog/style'
import 'vant/lib/field/style'
import 'vant/lib/action-sheet/style'
import 'vant/lib/toast/style'



// 过滤器
Vue.filter('fixImgUrl', (oldUrl) => {
  if(oldUrl.indexOf("http") > -1) {
    return oldUrl;
  } else {
    return axios.defaults.baseURL + oldUrl;
  }
})

Vue.config.productionTip = false

new Vue({
  router,
  render: function(h) {return h(App)}
}).$mount('#app')
